export const RE_EMAIL = /^[_a-z0-9-.]+@([-a-z0-9]+\.)+[a-z]{2,}$/i;
export const RE_PHONE = /^1[0-9]\d{9}$/;
export const RE_PASSWORD = /^[0-9A-Za-z!@#$%^&*]{8,16}$/;
export const TOKEN_KEY = "token";
export const TOKEN_EXPIRE = "token_expire";
export const NOT_PRODUCTION = process.env.VUE_APP_ENV !== "production";

/**
 * 状态枚举值
 */
export const stateList = [
  {
    name: "全部",
    value: undefined
  },
  {
    name: "未发布",
    alias: "unpublish",
    value: 1
  },
  {
    name: "已发布",
    alias: "published",
    value: 2
  },
  {
    name: "已撤回",
    alias: "back",
    value: 3
  },
  {
    name: "已结束",
    alias: "done",
    value: 4
  }
];

/**
 * 选项类型
 */
export const selectList = [
  {
    name: "全部",
    value: undefined
  },
  {
    name: "单选",
    value: 1
  },
  {
    name: "多选",
    value: 2
  }
];
/**
 * 投票修改类型
 */
export const voteUpdateType = [
  {
    name: "不可修改",
    value: 1
  },
  {
    name: "截止日期前可修改",
    value: 2
  }
];

/**
 * 小区类型
 */
export const typeList = [
  {
    name: "全部",
    value: undefined
  },
  {
    name: "街道",
    value: 2
  },
  {
    name: "居委",
    value: 3
  },
  {
    name: "物业",
    value: 4
  }
];

/**
 * 工单汇览类型
 */
export const orderTypeList = [
  {
    name: "全部",
    value: undefined
  },
  {
    name: "保安",
    value: 1
  },
  {
    name: "保修",
    value: 2
  },
  {
    name: "保洁",
    value: 3
  },
  {
    name: "保绿",
    value: 4
  },
  {
    name: "车辆管理",
    value: 5
  },
  {
    name: "安全管理",
    value: 6
  }
];
